How to know? Which version of PostgreSQL am I running?
How to know? Which version of PostgreSQL am I running?
1382
14-Jul-2023
Updated on 15-Jul-2023
Aryan Kumar
15-Jul-2023Sure, there are a few ways to know which version of PostgreSQL you are running.
Using the
psqlcommandOne way to check the version of PostgreSQL you are running is to use the
psqlcommand. Thepsqlcommand is a command-line tool that can be used to interact with a PostgreSQL database.To check the version of PostgreSQL you are running, open a command prompt and run the following command:
This will display the version of PostgreSQL that you are running.
Using the
pg_versionfunctionAnother way to check the version of PostgreSQL you are running is to use the
pg_versionfunction. Thepg_versionfunction is a function that returns the version of PostgreSQL that is running.To check the version of PostgreSQL you are running, open a PostgreSQL session and run the following command:
This will return the version of PostgreSQL that you are running.
Using the
pgAdmintoolIf you are using the pgAdmin tool, you can check the version of PostgreSQL you are running by opening the pgAdmin tool and expanding the Servers tree.
In the Servers tree, right-click the server that you want to check the version for and select Properties. In the Properties dialog box, the version of PostgreSQL that you are running will be displayed in the Version property.